home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / dev / gcc / gcc222_1.lha / readme.amiga.port < prev    next >
Text File  |  1993-03-08  |  8KB  |  189 lines

  1. Release date: 8 May 1993
  2.  
  3. This file contains disclaimer and copyright notices as well as a brief
  4. description of unusual or new features of the porting of the GNU C and
  5. C++ compiler version 2.2.2 for the Amiga Sistem.
  6.  
  7. The porting was done by Davide Pasetto (il dipo) and is (c)Copyright 1993.
  8.  
  9. The author releases this programming system under the GNU general public
  10. licence that you can find in another file. You MUST read the licence before
  11. you use this programming system and, if you do not accept that licence, you
  12. should delete everything.
  13.  
  14. The programming system v2.2.2 release 0 is composed of:
  15.  
  16. GNU C compiler      v2.2.2   (c)Copyright GNU
  17. GNU C preprocessor  v2.2.2   (c)Copyright GNU
  18. GNU C++ compiler    v2.2.2   (c)Copyright GNU
  19. dlink linker        v2.06.05 (c)Copyright Matt Dillon
  20. pasm  assembler     v1.0     (c)Copyright Davide Pasetto (il dipo)
  21. prelink prelinker   v2.0     (c)Copyright Davide Pasetto (il dipo)
  22. fdtoin  utility     v2.0     (c)Copyright Davide Pasetto (il dipo)
  23. genclass utility    v1.0     (c)Copyright Davide Pasetto (il dipo) 
  24. gnulib.lib          v2.0     (c)Copyright Davide Pasetto (il dipo) & GNU
  25. gnulibnf.lib        v2.0     (c)Copyright Davide Pasetto (il dipo) & GNU
  26. ansic.lib           v2.0     (c)Copyright Davide Pasetto (il dipo)
  27. cplusplus.lib       v2.2.2   (c)Copyright GNU
  28. ansic include files v2.0     (c)Copyright Davide Pasetto (il dipo)
  29. cplusplus includes  v2.2.2   (c)Copyright GNU
  30. container classes   v2.2.2   (c)Copyright GNU
  31. startup files       v2.0     (c)Copyright Davide Pasetto (il dipo)
  32. several docs        v2.2.2   (c)Copyright GNU
  33.  
  34. The amigaguide (R) hypertext format docs were converted by makeinfo utility.
  35.  
  36. All this programs except dlink are compiled with this programming system and
  37. work ONLY under Amiga OS2.0 or higher.
  38.  
  39. For problems, questions or bug report please contact:
  40.  
  41. Davide Pasetto (il dipo),
  42. via Gereschi 14, 56127, PISA, ITALY
  43. e-mail: 2:332/602.18
  44.  
  45. ---------------------------- ANSI C LIBRARY ---------------------------
  46.  
  47. The ansic library contains all the c interface functions described in
  48. the ANSI standard definition, plus some very used BSD and SYS V
  49. functions. The whole library is compiled with GNUC and with -O2
  50. optimization level; this makes the library a little bigger but faster.
  51.  
  52. ------------------------------- Signals -------------------------------
  53.  
  54. Actually the library knows the existence of 25 signals (all the signal
  55. I can found in ANSI standard or in the UN*X manuals), but by now only
  56. 4 can be generated, and they are atached to CTRL_C, CTRL_D, CTRL_E,
  57. CTRL_F. The un*x signals on the Amiga are recognized by an exception
  58. handler commected to the exec task; the signal actually recognized by
  59. this handler are: 
  60.  
  61.     SIGKILL    (connected to CTRL_C, default is abort() and cannot be changed)
  62.     SIGTSTP    (connected to CTRL_D, default is stop task processing)
  63.     SIGCONT (connected to CTRL_E, default is nothing or resume
  64.                  task processing if disabled)
  65.     SIGINT (connected to CTRL_F).
  66.  
  67. SIGTSTP and SIGCONT can be used to stop task processing, thus freeing
  68. CPU power, and then continue task processing.
  69.  
  70. Unfortunatelly exception handling is well supported only by exec, but
  71. it's not supported by the rest of the Amiga OS, so we must use it with
  72. care: we must add the concept of 'atomic section'.
  73.  
  74. Definition: 'atomic section' is a piece of code that cannot be
  75. interrupted by an externally generated task exception. Atomic sections
  76. must be declared using two new macros defined in signal.h:
  77.  
  78.     ATOMIC_ON
  79.     ATOMIC_OFF
  80.  
  81. The first one is used to start the section, while the second one stops it;
  82. they use a nesting counter, so you must call ATOMIC_OFF as much as you
  83. call ATOMIC_ON. Almost every Amiga OS function must be called in atomic
  84. mode, every functions that could work on global data structures MUST be
  85. called in atomic mode, this means the whole dos.library, intuition and
  86. graphics, but (I think) not the math libraries (for example). C standard
  87. library knows of this exception handling processing, it uses it and does
  88. its best to optimize the atomic section declarations. If you set your own
  89. signal handler routine (using signal call), it will be executed in an
  90. atomic section, so no other signal can happend while it's executing.
  91. Direct usage of the exec exception facility is not supported by the
  92. ansic.lib.
  93.  
  94. --------------------------- Stack Checking ------------------------------
  95.  
  96. Stack checking is avaiable by the use of the -mcheck-stack switch. By
  97. default stack checking code implements a dynamic growing and shrinking
  98. stack allocating and freeing memory as needed. It will only abort the
  99. task when no memory can be found. As usual stack cheching adds some
  100. overhead to each call to a program function and to the alloca
  101. function.
  102.  
  103. The user can sobstitute the default stack checking behaviour by giving
  104. the folowing functions and variabiles:
  105.  
  106. ULONG ___Stack_Limit   this variable contains the current lowest stack
  107.                        possible value
  108.  
  109. UWORD ___Stack_Changed this variable is 0 if the stack is the initial
  110.                        one, non zero if not
  111.  
  112. ___Stack_Init          this function initializes stack checking system
  113. ___Stack_End           this one must free every still allocated stack chunk
  114. ___Stack_Overflow      this one is called when stack overflows; it has
  115.                        one parameter: needed minimum stack size; if it
  116.                        returns it MUST eat his parameter and MUST have
  117.                        changed a7 to a stack that it AT LEAST as large
  118.                        as required.
  119. ___Stack_Adjust        this function is called at the end of each
  120.                        function when ___Stack_Changed is non zero;
  121.                        this can do the dynamic stack shrinking.
  122.  
  123. NOTE: This feature has not been tested very much and I would like to hear any
  124. comment and bug report about it.
  125.  
  126.  
  127. --------------------------- Linker options --------------------------------
  128.  
  129. The linker supported options are:
  130.  
  131. -Lfloat      link with floating point support (it requires
  132.              mathieee*.library on execution); default is off.
  133.  
  134. -Lplus       link for cplusplus.
  135.  
  136. -Lnostdlib   link with no stdlibrary (also no floating math supported);
  137.              programs linked so will work also under 1.3.
  138.  
  139.  
  140. ------------------------ Inline function calls --------------
  141.  
  142. The compiler supports inline function calls to all those Amiga OS
  143. library function that does not get or return double values. The inline
  144. function support is made by the fdtoin program; to use it you must
  145. assign fd: where the fd files are, clib: where the library protos are,
  146. and inline: where you want the program put the inline calls definition
  147. files.
  148.  
  149. Note that the library calls are inlined ONLY when optimizing (as are
  150. all the inline functions with GNUC 2.2.2).
  151.  
  152. There is a bug: template is a keyword for C++ compiler, so any
  153. function that has template as argument will give syntax error when
  154. compiled with GNU C++. This is the case of ReadArgs and another dos
  155. function, so you should edit the inline file by hand and change
  156. parameter name.
  157.  
  158.  
  159. --------------------- C++ container class constructors ------------
  160.  
  161. The c++ container class constructor is calles genclass and works like
  162. the GNU shell script described in the library manual: first you must
  163. see if the class needs one or two type definition. In the first case
  164. you use "genclass type [ref or val]" while in the second you must use
  165. "genclass -2 type1 [ref or val] type2 [ref or val]". Remember that ref
  166. means to add a `&' behind the type.
  167.  
  168.  
  169. ------------------------- Known bugs ---------------------------------
  170.  
  171. Some bugs still remains in the cplusplus library; expecially the library
  172. test of random number generator failed and I could not understand why.
  173. I think that the floating point subsystem is good becouse that happends also
  174. when compiled for 68882 only, so I cannot understand what happened. I'll
  175. work on this. I found other transitory problems in the stream subsystem of
  176. this library: it happened that it lost one or two chars during reading, and also
  177. in this case I could not understand why. I would like to hear some feedback
  178. from you about this.
  179.  
  180.  
  181. ------------------------ Future attractions ----------------------------
  182.  
  183. I'am working on the GNU objective c compiler to create a runtime environment
  184. and this should be released as update 1 to this programming system in 2 weeks.
  185.  
  186. I'am also working on GNU symbolic debugger but this is a more difficult project
  187. and I cannot say when it will be ready.
  188.  
  189.